/**
 * 商品相关接口
 * 
 * @author 杨斌
 * @since 2019-05-19
 */
import common from './common'
import store from './store'

var ApiList = {};

//API 接口

/**
 * 分类
 */
ApiList.cate = function(okCb, failCb){
    var p = {}
    common.Api('/index/cate', p, okCb, failCb)
}

/**
 * 商品列表
 */
ApiList.goods = function(type, okCb, failCb){
    var p = {
        p: 1,
        type,
    }
    common.Api('/goods/index', p, okCb, failCb)
}

/**
 * 商品详情
 */
ApiList.detail = function(id, okCb, failCb){
    var p = {
        id
    }
    common.Api('/goods/item', p, okCb, failCb)
}


export default ApiList;